<?php

/**
	[UltraX] (C)2001-2009 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$Id: index.php 2026 2009-12-29 09:00:29Z Cnteacher $
*/

require './config/config_global.php';

$_t_curapp = '';

foreach($_config['app']['domain'] as $_t_app => $_t_domain) {
	if($_t_domain == $_SERVER['HTTP_HOST']) {
		$_t_curapp = $_t_app;
		break;
	}
}

if(empty($_t_curapp)) {
	$_t_curapp = !empty($_config['app']['default']) ? $_config['app']['default'] : 'forum';
}

$_SERVER['PHP_SELF'] = str_replace('index.php', $_t_curapp.'.php', $_SERVER['PHP_SELF']);

require './'.$_t_curapp.'.php';

?>